package com.example.rabcdemo.controller;

import com.example.rabcdemo.annotation.RequestPermission;
import com.example.rabcdemo.entity.Students;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("stus")
@Slf4j
public class StudentController {

    @GetMapping("add")
    @RequestPermission(name="新增学生",expression = "stus:add")
    public void add(){
        log.info("新增学生被请求了");
    }


    @GetMapping("findAll")
    @RequestPermission(name="查询学生",expression = "stus:findAll")
    public void findAll(){
        log.info("查询学生被请求了");
    }

    @GetMapping("delete")
    @RequestPermission(name="删除学生",expression = "stus:delete")
    public void delete(){
        log.info("删除学生被请求了");
    }


}
